<template>
  <div>
    aaa
    <p>上传图片</p>
    <input type="file" v-on:change="selImage" accept="image/*" name="ClubImagesUpload" id="ClubImagesUpload" class="hide" multiple="multiple" >

    <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1594915685144&di=30d0584f64335339fce7427d6341faa2&imgtype=0&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fbaike%2Fw%3D268%2Fsign%3D792273edf9edab6474724ac6cf36af81%2Fa08b87d6277f9e2fda25102e1d30e924b899f380.jpg" class="addImg"/>
    <div class="form-group form-row" id="preViewMore"><div class="row">
      <div class="col-xs-9">
         <div id="clubInputImagePreview" class="col-sm-9 img-preview img-preview-sm"></div>
       </div>
  </div></div>
    标题：<textarea v-model="introduce">abc</textarea>
    <p>introduce is {{introduce}}</p>
    <button v-on:click="submit">确定</button>
  </div>
</template>

<script>

  export default {
    data () {
      return {
        list:[],
        selIndex:0,
        introduce:''
      }
    },
    mounted() {
      this.loadData()
    },
    methods:{
      loadData(){

         this.getAxios('boardCategory/pageList').then(res => {
           console.log(rs.length)
           for (var i = 0; i < res.length; i++) {
             var rs = res[i]
             console.log(rs.title)
           }
         });
        this.$axios.get('http://support.miniprogramhacker.cn/test/rest/boardCategory/pageList').then(res => {
          this.list = res.data.data
          console.log(res.data.data)
        })
      },
      loadBoards(categoryId){
        this.$axios.get('http://support.miniprogramhacker.cn/test/rest/billboard/pageList?categoryId='+categoryId).then(res => {
          // alert(categoryId)
          console.log(res.data.data)
        })
      },
      selChange(val){
        var cat = this.list[this.selIndex]
        this.loadBoards(cat.id)

      },
      selImage(value){
        console.log(value.filePath)
        console.log(value.localFile)
        console.log(value)
      }


    }
  }
</script>

<style>
</style>
